using Microsoft.Phone.Controls.Maps.Core;
using System;
using System.Globalization;
using System.Windows.Automation.Peers;
using System.Windows.Automation.Provider;
namespace Microsoft.Phone.Controls.Maps.AutomationPeers
{
	public class MapBaseAutomationPeer : BaseAutomationPeer, IValueProvider
	{
		private readonly MapBase map;
		protected MapBase Map
		{
			get
			{
				return this.map;
			}
		}
		public bool IsReadOnly
		{
			get
			{
				return true;
			}
		}
		public string Value
		{
			get
			{
				if (this.map != null)
				{
					return string.Format(CultureInfo.get_InvariantCulture(), "ZoomLevel={0}|Latitude={1}|Longitude={2}|Heading={3}|Pitch={4}|MapMode={5}|Width={6}|Height={7}", new object[]
					{
						this.map.ZoomLevel,
						this.map.Center.get_Latitude(),
						this.map.Center.get_Longitude(),
						this.map.Heading,
						this.map.Pitch,
						this.map.Mode,
						this.map.get_ActualWidth(),
						this.map.get_ActualHeight()
					});
				}
				return "Invalid map object";
			}
		}
		public MapBaseAutomationPeer(MapBase element) : this(element, "MapBase")
		{
		}
		public MapBaseAutomationPeer(MapBase element, string className) : base(element, className)
		{
			this.map = element;
		}
		public override object GetPattern(PatternInterface patternInterface)
		{
			if (patternInterface == 2)
			{
				return this;
			}
			return base.GetPattern(patternInterface);
		}
		public void SetValue(string value)
		{
			throw new NotImplementedException();
		}
	}
}
